< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03101000.xhp

(section: cstr) (bookmark: bm_id3146958)
CStr function

CStr 関数

CStr Function [Runtime]
CStr 関数 [実行時](hd_id3146958.1)

Converts any numeric expression to a string expression.
数値表式を、文字列に変換します。(par_id3147574.2)

(/section: cstr)

Syntax:
構文:(hd_id3148473.3)

CStr (Expression)
CStr (Expression)(par_id3145315.4)

Return value:
戻り値:(hd_id3153062.5)

String
文字列(par_id3153897.6)

Parameters:
パラメータ:(hd_id3154760.7)

Expression: Any valid string or numeric expression that you want to convert.
Expression: 変換させる文字列および数値表式。(par_id3149457.8)

Expression Types and Conversion Returns
変換させる表式のデータ型と得られる戻り値(hd_id3150358.9)

Boolean :
ブール型:(par_id3153192.10)

String that evaluates to either True or False.
True または False としての評価結果の文字列。(par_id3156422.11)

Date :
日付:(par_id3147287.12)

String that contains the date and time.
該当する日付と時刻を表す文字列。(par_id3155411.13)

Null :
Null:(par_id3147428.14)

Run-time error.
実行時エラー。(par_id3150486.15)

Empty :
空白:(par_id3153953.16)

String without any characters.
文字長ゼロの空白文字列。(par_id3155306.17)

Any :
その他:(par_id3149260.18)

Corresponding number as string.
該当する数値を文字列化したもの。(par_id3152938.19)


Zeros at the end of a floating-point number are not included in the returned string.
浮動小数点の末尾にくるゼロは、返される文字列には含まれません。(par_id3155738.20)

(embed text/sbasic/shared/00000003.xhp#errorcode : linkinfo)

Error Codes

エラーコード(hd_id3152869.37)

(/embed text/sbasic/shared/00000003.xhp#errorcode)

(embed text/sbasic/shared/00000003.xhp#err5 : linkinfo)

5 Invalid procedure call
5 無効なプロシージャー呼び出しです (par_id3150891.41)

(/embed text/sbasic/shared/00000003.xhp#err5)

Example:
例:(hd_id3154729.21)

Sub ExampleCSTR
Sub ExampleCSTR(par_id3153878.22)

Dim sVar As String
Dim sVar As String(par_id3154943.23)

Msgbox CDbl(1234.5678)
Msgbox CDbl(1234.5678)(par_id3156283.24)

Msgbox CInt(1234.5678)
Msgbox CInt(1234.5678)(par_id3147396.25)

Msgbox CLng(1234.5678)
Msgbox CLng(1234.5678)(par_id3155600.26)

Msgbox CSng(1234.5678)
Msgbox CSng(1234.5678)(par_id3153416.27)

sVar = CStr(1234.5678)
sVar = CStr(1234.5678)(par_id3156559.28)

MsgBox sVar
MsgBox sVar(par_id3153947.29)

end sub
end sub(par_id3150327.30)


< Prev / Next >